<?php
/* @var $this ThongBaoMoiThauController */
/* @var $model FormThongBaoMoiThau */

$this->breadcrumbs=array(
    'Thông báo mời thầu',
    'Danh sách',
);

$this->menu=array(
    array('label'=>'List FormThongBaoMoiThau', 'url'=>array('index')),
    array('label'=>'Create FormThongBaoMoiThau', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#form-thong-bao-moi-thau-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Duyệt tin thông báo mời thầu</h1>

<p>
    You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b>
    or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php echo CHtml::link('Tìm kiếm nâng cao','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
    <?php $this->renderPartial('_search',array(
        'model'=>$model,
    )); ?>
</div><!-- search-form -->

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'id'=>'form-thong-bao-moi-thau-grid',
    'dataProvider'=>$model->duyet(),
    'filter'=>$model,
    'columns'=>array(
        'id',
        'nganh',
        'linh_vuc',
        'dia_diem',
        'ten_du_an',
        'nguon_von',
        /*
        'ben_moi_thau',
        'hinh_thuc',
        'thoi_gian_bat_dau',
        'thoi_gian_ket_thuc',
        'dia_diem_ban',
        'gia_ban',
        'thoi_gian_dong_thau',
        'ngay_xuat_ban',
        'so_bao_dang',
        'tinh_trang_tong_tin',
        'ma_thong_tin',
        'thong_tin_chuyen_tien',
        'thong_tin_khac',
        'id_nguoi_tao',
        'ngay_tao',
        'id_nguoi_chinh_sua',
        'id_nguoi_duyet',
        'status',
        'da_thanh_toan',
        'tong_tien',
        'ngay_duyet',
        */
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{duyettin} {update} {delete}',
            'buttons' => array
            (
                'duyettin' => array
                (
                    'label' => 'Duyệt tin',
                    'icon' => 'bell',
                    'url' => 'Yii::app()->createUrl("thongbaomoithau/duyettin", array("id"=>$data->id))',
                    'options' => array(
                        'class' => 'btn btn-small duyettin',
                    ),
                ),

                'update' => array
                (
                    'label' => 'Cập nhật',
                    'icon' => 'pencil',
                    'url' => 'Yii::app()->createUrl("thongbaomoithau/update", array("id"=>$data->id))',
                    'options' => array(
                        'class' => 'btn btn-small capnhat',
                    ),
                ),
                'delete' => array
                (
                    'label' => 'Xóa',
                    'icon' => 'trash',
                    'url' => 'Yii::app()->createUrl("thongbaomoithau/delete", array("id"=>$data->id))',
                    'options' => array(
                        'class' => 'btn btn-small xoa',
                    ),
                ),
            ),
            'htmlOptions'=>array(
                'style'=>'width: 130px',
            ),
        ),
    ),
)); ?>
